Skip to content

Add a note to the style guide about abbreviations - #1844

Open
sirosen wants to merge 6 commits into
python:mainfrom
sirosen:add-abbreviations-to-style-guide
Open

Add a note to the style guide about abbreviations#1844
sirosen wants to merge 6 commits into
python:mainfrom
sirosen:add-abbreviations-to-style-guide

Conversation

@sirosen

@sirosen sirosen commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Hat tip to @hugovk for this! Not only the issue (#1824), but also his comments preceding it made this easy to write.

This as a draft because it conflicts with #1828, which is already approved and should ideally merge first.
Once that's done, the exact positioning of this content in the page may change.

Open question: should this be converted to be a subsection of "Use simple language" or "Specific words"?


resolves #1824

After the section on specific terms, but before "simple language", add a section that explains that documentation should spell out acronyms, preferring the "<full-spelling> (<acronym>)" format.

resolves python#1824

After the section on specific terms, but before "simple language", add a
section that explains that documentation should spell out acronyms,
preferring the "<full-spelling> (<acronym>)" format.
@read-the-docs-community

read-the-docs-community Bot commented Jun 26, 2026

Copy link
Copy Markdown

@StanFromIreland

Copy link
Copy Markdown
Member

Hi Stephen, this issue was originally specific to :abbr:, but I like your expanded approach. I would however suggest a little move.

  • We have a section for Sphinx roles, which is where I think the role-specific guidance should go.
  • Spelling out acronyms can be moved to "Use simple language" (which, as I think about it now, would be better if it was named "Use accessible language," but that's for another day ;-).

@sirosen

sirosen commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Oh, I hadn't even thought to put it in the role usage docs! 🤦
That seems obvious now.

I want to keep some explanation of the rationale. I'll move things as you suggest, and I think the "some assistive technology" note will end up with the roles.


Edit done! LMK if it needs more tuning.

The role is documented in with other sphinx roles. In order for the rst
to read easily, one line of non-semantic whitespace was added to a list.

The acronym usage note is moved to the end of "Use simple language"
@sirosen

sirosen commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

"Use simple language" (which, as I think about it now, would be better if it was named "Use accessible language," but that's for another day ;-).

Maybe... I like "Use simple language". It has two virtues:

  1. It is a simpler word for the idea of "accessibility", more familiar to more readers -- to a large degree they are equivalent here
  2. In the measure that the two words are not equivalent, "simple" is good general advice for writing well

I could probably be convinced, but we can discuss outside of this PR. 😁

@StanFromIreland

StanFromIreland commented Jun 26, 2026

Copy link
Copy Markdown
Member

As I said, that's for another day ;-) I also have to catch up on the Discord discussion.

Thanks for the changes, it's what I had in mind.

@python-cla-bot

python-cla-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@sirosen
sirosen marked this pull request as ready for review July 24, 2026 20:07
Comment thread documentation/style-guide.rst Outdated
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Comment thread documentation/style-guide.rst Outdated
Co-authored-by: Stan Ulbrych <stan@python.org>
Don't use Latin abbreviations like "e.g." or "i.e." where English words will do,
such as "for example" or "that is."

In general, the first time an acronym is used on a page, spell it out.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ironically nothing in the devguide defines the "HTML" abbreviation which you use in the other part of this PR. And I think that's a good thing: in computing there are some terms that are more widely understood as abbreviations than as the full form, and adding the full form is more likely to distract than to help readers. HTML is one of those terms. Other examples off the top of my head are UTF-8, PNG, SVG, SQL.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sometimes an acronym becomes a term or word in its own right.
The guidance should be read as flexible in this respect.

We added the "In general" to try to succinctly cover this. Do you feel it needs more explanation? We can try another arrangement if the current text looks too strong.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current text will likely lead people to comment that you need to say "Hyper-Text Markup Language". I'd suggest wording like "Commonly understood acronyms such as HTML or UTF-8 do not need to be expanded."

@sirosen sirosen Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried a few different "spellings" of the idea, and ended up with almost exactly this suggested text.

(Sorry, I broke the typical rules and did an amend, as I forgot to put Jelle in as a co-author at first!)

@StanFromIreland StanFromIreland Jul 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as I forgot to put Jelle in as a co-author at first!)

In that case, in the future please comment for whoever is merging to add it in (we squash anyway), to avoid amends.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or add an empty commit with the co-author, or don't worry about it :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll use an empty commit if it comes up again! That way, it's automatically included in the squash and nobody has to do anything extra.

I strive for perfection, including in my citations. Clearly I need to take the no-force-pushes rule into account more strongly! 😅

Co-authored-by: Jelle Zijlstra <906600+JelleZijlstra@users.noreply.github.com>
@sirosen
sirosen force-pushed the add-abbreviations-to-style-guide branch from a82602e to d0cdf9e Compare July 28, 2026 16:07

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple final nits, otherwise looks great.

Additionally, can you fix these, please:

$ gg ":abbr:"
developer-workflow/development-cycle.rst:to the :abbr:`VCS (version control system)`.
developer-workflow/stdlib.rst:tracker and :abbr:`VCS (version control system)`.
developer-workflow/stdlib.rst:by following the :abbr:`PEP (Python Enhancement Proposal)` process.
development-tools/clinic/index.rst:The Argument Clinic :abbr:`CLI (Command-Line Interface)` is typically used to
getting-started/pull-request-lifecycle.rst::abbr:`VCS (version control system)` to be released
getting-started/setup-building.rst:     Contains the :abbr:`PEG (Parser Expression Grammar)` grammar file for
testing/coverage.rst:to the language and :abbr:`stdlib (standard library)` are accompanied by

With those, LGTM :-)

Comment thread documentation/markup.rst
interpreted text roles of the form ``:rolename:`content```
to insert semantic markup in documents.

In the CPython documentation, there are a couple common cases

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the CPython documentation, there are a few common cases

We're now at three :-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that suggestion seems broken, for clarity: "couple" -> "few"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll do a normal commit with this + the :abbr: fixes + the fix below, so I'll try not to think about what that weird rendering in GitHub means.

Don't use Latin abbreviations like "e.g." or "i.e." where English words will do,
such as "for example" or "that is."

In general, the first time an acronym is used on a page, spell it out.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add "abbreviation" here please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recommend avoiding abbr role

4 participants